import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import * as ElIcon from '@element-plus/icons-vue'
import '@/style/global.css'
import '@/style/commonStyle.css'

import Index from './views/components/Index.vue'
// 注册指令
import plugins from './plugins' // plugins
const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPersist)
app.component('Index', Index)
app.use(pinia)
app.use(router)
app.use(plugins)
app.use(ElementPlus, {
  locale: zhCn
})
app.use(ElIcon)

app.mount('#app')
